@page
@{ Layout = "_LayoutHome"; }
@section Styles{
    <style>
        .el-form-item {
            margin-bottom: 0px;
        }

        body {
            padding: 0;
            margin: 0;
            background-color: #ffffff;
        }

        html {
            padding: 0;
            margin: 0;
            background-color: #ffffff;
        }
    </style>
}
<el-card class="rounded-0">
    <div class="d-flex justify-content-between align-items-center">
        <div>
            <h2 class="h1 fw-bold">刷题中心</h2>
            <small>共 {{total}} 道题可供练习</small>
        </div>
        <div>
            <el-button type="primary" plain v-on:click="btnCreateClick('All')">
                <i class="bi bi-fast-forward-circle-fill me-3"></i>快速开始（{{total}}）
            </el-button>
            <el-button type="success" plain v-on:click="btnCreateClick('Collect')">
                <i class="bi bi-person-hearts me-3"></i>收藏练习（{{collectTotal}}）
            </el-button>
            <el-button type="warning" plain v-on:click="btnCreateClick('Wrong')">
                <i class="bi bi-backspace-reverse me-3"></i>错题练习（{{wrongTotal}}）
            </el-button>
            <el-button plain v-on:click="btnLogClick" class="ms-5">
                <i class="bi bi-person-lines-fill me-3"></i>刷题记录
             </el-button>
        </div>
    </div>
</el-card>
<div class="p-3">
    <div v-if="total>0">
        <div class="ms-5 position-relative card-hover-with-icon" v-for="(item,index) in list" style="cursor:default;">
            <div class="position-absolute top-50 start-0 translate-middle">
                <div class="position-relative">
                    <i class="bi bi-pencil-square fs-2"></i>
                    <span class="position-absolute top-100 start-100 translate-middle fs-6">{{ index+1 }}</span>
                </div>
            </div>
            <el-card shadow="hover" class="rounded-0 border-start-0 border-end-0">
                <div class="row align-items-center g-3 ms-6">
                    <div class="col">
                        <div class="text-gray-400">
                            <span>包含知识点</span>
                        </div>
                        <div class="mt-1">
                            <el-tag type="success" size="mini" class="mt-1 me-1" v-for="zsd in item.zsds">{{ zsd }}</el-tag>
                        </div>
                        <div class="mt-3">
                            <span class="px-3 py-1 bg-light card-icon">共：<span class="text-success me-2">{{ item.tmTotal }}</span>道题</span>
                        </div>
                    </div>
                    <div class="col-auto">
                        <div class="bg-light p-1">
                            <el-button type="primary" plain icon="el-icon-s-order" class="py-5" v-on:click="btnCreateClick('Group',item.id,item.tmTotal)">开始练习</el-button>
                        </div>
                    </div>
                </div>
            </el-card>
        </div>
        <div class="my-5 text-center">
            <small>没有更多了</small>
        </div>
    </div>
    <div class="pt-10" v-else>
        <el-empty image="/sitefiles/assets/images/nodata.svg"></el-empty>
    </div>
</div>
@section Scripts{
    <script src="/sitefiles/assets/js/home/exam/examPractice.js" type="text/javascript"></script>
}